<!DOCTYPE html>
<html>
<head>
<!-----------------------------------------------------------------------
- Copyright of this file: Copyright (C) 2025, iwyxdxl
- Licensed under GNU GPL-3.0 or higher, see the LICENSE file for details.
------------------------------------------------------------------------>
    <title>编辑Prompt</title>
    <style>
        body { 
            max-width: 800px; 
            margin: 20px auto; 
            padding: 20px;
            background-color: #f5f5f5;
            font-family: Arial, sans-serif;
        }
        textarea { 
            width: 100%; 
            height: 400px; 
            padding: 15px;
            font-family: monospace;
            border: 1px solid #ddd;
            border-radius: 4px;
            resize: none;
        }
        form {
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .form-group {
            margin-bottom: 20px;
        }
        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #333;
            font-weight: bold;
        }
        .form-group input,
        .form-group textarea {
            display: block;
            width: 100%;
            padding: 8px;
            font-size: 16px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        .form-group input:focus,
        .form-group textarea:focus {
            border-color: #4caf50;
            outline: none;
        }
        button[type="submit"] {
            background-color: #4caf50;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
        }
        button[type="submit"]:hover {
            background-color: #45a049;
        }
        .cancel-link {
            margin-left: 15px;
            font-size: 16px;
            text-decoration: none;
            color: #333;
            transition: color 0.3s;
        }
        .cancel-link:hover {
            color: #777;
        }
    </style>
</head>
<body>
    <h1>编辑Prompt</h1>
    <form method="post">
        <div class="form-group">
            <label>文件名:</label>
            <input type="text" name="filename" value="{{ filename }}" required>
        </div>
        <div class="form-group">
            <label>内容:</label>
            <textarea name="content">{{ content }}</textarea>
        </div>
        <div>
            <button type="submit">保存</button>
            <a href="{{ url_for('prompt_list') }}" class="cancel-link">取消</a>
        </div>
    </form>
</body>
</html>